Inferring Loop Invariants Dynamically
نویسندگان
چکیده
There is extensive literature on inferring loop invariants statically (i.e. without explicitly executing the program under analysis). We report on a new dynamic technique for inferring loop invariants based on the invariant detector Daikon [2]. Unlike InvGen [4], this new technique follows a counter example guided approach for refining candidate loop invariants. Let us consider the following annotated program for multiplying 16 bit integers in the left column:
منابع مشابه
Inferring Invariants by Symbolic Execution
In this paper we propose a method for inferring invariants for loops in Java programs. An example of a simple while loop is used throughout the paper to explain our approach. The method is based on a combination of symbolic execution and computing fixed points via predicate abstraction. It reuses the axiomatisation of the Java semantics of the KeY system. The method has been implemented within ...
متن کاملAutomatically inferring loop invariants via algorithmic learning
By combining algorithmic learning, decision procedures, predicate abstraction, and simple templates for quantified formulae, we present an automated technique for finding loop invariants. Theoretically, this technique can find arbitrary first-order invariants (modulo a fixed set of atomic propositions and an underlying SMT solver) in the form of the given template and exploit the flexibility in...
متن کاملData-Driven Loop Invariant Inference with Automatic Feature Synthesis
We present LOOPINVGEN, a tool for generating loop invariants that can provably guarantee correctness of a program with respect to a given specification. We extend the data-driven approach to inferring sufficient loop invariants from a collection of program states. In contrast to existing data-driven techniques, LOOPINVGEN is not restricted to a fixed set of features – atomic predicates that are...
متن کاملInferring Invariants in Separation Logic for Imperative List-processing Programs
An algorithm is presented for automatically inferring loop invariants in separation logic for imperative list-processing programs. A prototype implementation for a C-like language is shown to be successful in generating loop invariants for a variety of sample programs. The programs, while relatively small, iteratively perform destructive heap operations and hence pose problems more than challen...
متن کاملAutomatically Inferring Quantified Loop Invariants by Algorithmic Learning from Simple Templates
By combining algorithmic learning, decision procedures, predicate abstraction, and simple templates, we present an automated technique for finding quantified loop invariants. Our technique can find arbitrary first-order invariants (modulo a fixed set of atomic propositions and an underlying SMT solver) in the form of the given template and exploits the flexibility in invariants by a simple rand...
متن کامل